package com.rxyb.core.respone.exception;


import com.rxyb.core.respone.IBaseCode;

/**
 * @author YJH
 * @version 1.0
 * @description 响应异常类操作
 * @date 2020/5/21  11:54
 */
public class RException extends RuntimeException {


    private static final long serialVersionUID = 2851164857842902182L;


    /**
     * 错误码
     */
    private IBaseCode errorCode;

    public RException(IBaseCode errorCode) {
        super(errorCode.getMsg());
        this.errorCode = errorCode;
    }

    public RException(String message) {
        super(message);
    }

    public RException(Throwable cause) {
        super(cause);
    }

    public RException(String message, Throwable cause) {
        super(message, cause);
    }

    public IBaseCode getErrorCode() {
        return errorCode;
    }
}
